/* eslint-disable no-undef */
import { createApp } from '../../com/vue.js';
createApp({
    data() {
        return {
            title: [
                {
                    item: 'html',
                },
                {
                    item: 'css',
                },
                {
                    item: 'js',
                },
                {
                    item: 'vuejs',
                },
            ],
            contents: [
                {
                    item: 'html-contents',
                },
                {
                    item: 'css-contents',
                },
                {
                    item: 'js-contents',
                },
                {
                    item: 'vuejs-contents',
                },
            ],
        };
    },
    methods: {
        change(i) {
            let div = document.querySelectorAll('main>div');
            for (let index = 0; index < div.length; index++) {
                if (index != i) {
                    div[index].classList.remove('active');
                } else {
                    div[index].classList.add('active');
                }
            }
        },
    },
}).mount('#app');
